<template>
  <TopNavbar :control="true" />
  <view class="top-bg"></view>
  <view class="user-view">
    <view class="left">
      <view class="face">
        <image src="@/static/images/icon_code.png" />
      </view>
      <view class="user-info">
        <view class="tit">账号名字</view>
        <view class="dd">
          <view class="phone">13217616769</view>
          <view class="tag">
            <image src="@/static/images/icon_member.png" />会员
          </view>
        </view>
      </view>
    </view>
    <view class="right">
      <image src="@/static/images/icon_code.png" />
    </view>
  </view>
  <div class="basic-view">
    <div class="basic-item">
      <div class="figure">0</div>
      <div class="text">余额</div>
    </div>
    <div class="basic-item">
      <div class="figure">0</div>
      <div class="text">积分</div>
    </div>
    <div class="basic-item">
      <div class="figure">0</div>
      <div class="text">优惠券</div>
    </div>
  </div>
  <div class="member-view">
    <div class="item">
      <div class="left">
        <image src="@/static/images/icon_member_black.png" />会员权益卡
      </div>
      <div class="right">更多会员权益等你来享受 <image src="@/static/images/icon_more.png" /></div>
    </div>
  </div>
  <Tabbar :tabbar-index="tabbarIndex" @updateTabbar="updateTabbar"></Tabbar>
</template>

<script>
import TopNavbar from "@/components/topNavbar/index.vue"
import Tabbar from "@/components/pageFooter/index.vue"
export default {
  components: {
    Tabbar,
    TopNavbar
  },
  data() {
    return {
      tabbarIndex: 4
    }
  },
  onLoad() {

  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.top-bg {
  background-color: #CFF276;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 460rpx;
  z-index: -1;
}

.user-view {
  display: flex;
  padding: 0 40rpx;
  justify-content: space-between;

  .left {
    display: flex;
    align-items: center;

    .face {
      margin-right: 20rpx;

      image {
        width: 120rpx;
        height: 120rpx;
        border-radius: 50%;
        overflow: hidden;
      }
    }

    .user-info{
      .tit{
        font-size: 30rpx;
        font-weight: bold;
      }
    }

    .dd {
      display: flex;

      .phone{
        color: #999;
        font-size: 20rpx;
        margin-top: 8rpx;
      }

      .tag {
        color: #fff;
        background-color: #000;
        border-radius: 110rpx;
        margin-left: 10px;
        font-size: 20rpx;
        width: 130rpx;
        height: 38rpx;
        line-height: 38rpx;
        text-align: center;

        image {
          width: 28rpx;
          height: 28rpx;
          margin-right: 10rpx;
          vertical-align: text-bottom;
        }
      }
    }
  }

  .right {
    image {
      width: 50rpx;
      height: 50rpx;
    }
  }
}

.basic-view{
  display: flex;
  text-align: center;
  margin-top: 30rpx;
  padding: 0 20rpx;
  justify-content: space-around;

  .basic-item{
    .figure{
      font-size: 40rpx;
      font-weight: bold;
    }
    .text{
      font-size: 24rpx;
    }
  }
}

.member-view{
  padding: 30rpx 40rpx;
  background-color: #fff;
  border-radius: 15rpx;
  margin: 0 20rpx;
  margin-top: 70rpx;

  .item{
    display: flex;
    align-items: center;
    justify-content: space-between;

    .left{
      font-size: 28rpx;
      font-weight: bold;
      
      image{
        vertical-align: text-bottom;
        width: 40rpx;
        height: 40rpx;
        margin-right: 10rpx;
      }
    }

    .right{
      color: #999;
      font-size: 20rpx;

      image{
        width: 30rpx;
        height: 25rpx;
        vertical-align: text-bottom;
      }
    }
  }
}
</style>
